package ch5.oop.ch3;

import ch5.ext.Pet;

public class Penguin extends Pet {
	private int health;
	private int love;

	public int getHealth() {
		return health;
	}

	public void setHealth(int health) {
		if (health > 100 || health < 0) {
			System.out.println("设置不正确");
			health = 60;
		}

		this.health = health;
	}

	public int getLove() {
		return love;
	}

	public void setLove(int love) {
		if (love > 100 || love < 0) {
			System.out.println("设置不正确");
			love = 60;
		}

		this.love = love;
	}

	@Override
	public void shout() {
		System.out.println("嘎嘎嘎");
	}

}
